package com.wsz.user.controller;

import com.wsz.pojo.R;
import com.wsz.pojo.dto.MatchingIdDto;
import com.wsz.user.service.StartGameService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StartGameController {

    @Autowired
    private StartGameService startGameService;

    @PostMapping("/pk/start/game")
    public R startGame(@RequestBody MatchingIdDto matchingIdDto){
        return startGameService.startGame(matchingIdDto.getAId(),matchingIdDto.getBId(),matchingIdDto.getABotId(),matchingIdDto.getBBotId());
    }
}
